import request from '@/api/request'

/**
 * 获取限时活动列表
 * @returns
 */
export function findAllRecommends() {
  return request({
    url: `/lejuAdmin/homeRecommend/findAllRecommends`
  })
}
/**
 * 删除限时活动
 * @param {*} id 限时活动id
 * @returns
 */
export function delRecommend(id) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${id}`,
    method: 'delete'
  })
}
/**
 * 修改限时活动
 * @param {*} data
 * @returns
 */
export function updateRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/updateRecommend`,
    method: 'post',
    data
  })
}
/**
 * 新增限时活动
 * @param {*} data
 * @returns
 */
export function addRecommend(data) {
  return request({
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    method: 'post',
    data
  })
}
